//author:dhclly
var o = console.log;
var NFish = /** @class */ (function () {
    function NFish() {
        this.swim = function () { };
        this.layEggs = function () { };
    }
    return NFish;
}());
function getSmallPet() {
    // ...
    return new NFish();
}
var pet = getSmallPet();
if (pet.swim) {
    pet.swim();
}
else {
    pet.fly();
}
